/*
 * Copyright (c) 2012-2014 The original author or authors
 * ------------------------------------------------------
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Apache License v2.0 which accompanies this distribution.
 *
 * The Eclipse Public License is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * The Apache License v2.0 is available at
 * http://www.opensource.org/licenses/apache2.0.php
 *
 * You may elect to redistribute this code under either of these licenses.
 */
package org.eclipse.moquette.proto.messages;

/**
 * Doesn't care DUP, QOS and RETAIN flags.
 * 
 * @author andrea
 */
public class DisconnectMessage extends ZeroLengthMessage {

    /**
     *
     * 服务器要根据先前此客户端在发送CONNECT消息可变头部Connect flag中的“Clean session flag”所设置值，再次复习一下：
     * 值为0，服务器必须在客户端断开之后继续存储/保持客户端的订阅状态。这些状态包括：
     * 存储订阅的消息QoS1和QoS2消息
     * 正在发送消息期间连接丢失导致发送失败的消息
     * 以便当客户端重新连接时以上消息可以被重新传递。
     * 值为1，服务器需要立刻清理连接状态数据。
     * 有一点需要牢记，服务器在接收到客户端发送的DISCONNECT消息之后，需要主动关闭TCP/IP连接。
     */
    public DisconnectMessage() {
        m_messageType = AbstractMessage.DISCONNECT;
    }
}
